<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>管理员-经纪人审核详情</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!--标准mui.css-->
    <link rel="stylesheet" href="../css/mui.min.css">
    <link rel="stylesheet" href="../js/loding/loding.css">
    <script src="../js/loding/loading.js"></script>
    <!--App自定义的css-->
    <!--<link rel="stylesheet" type="text/css" href="../css/app.css"/>-->
    <style>
        li{ list-style:none; }
        .mui-input-row label{width: 100%;font-size: 15px;}
        label{
            font-size: 12px!important;
        }
    </style>

</head>
<body>
<div class="mui-content" >            
    <form class="mui-input-group" style="margin-bottom: 65px">
        <div class="mui-input-row ">
            <label >订单编号：<span id="oredid"></span></label>
        </div>
        <div class="mui-input-row ">
            <label style="">下单时间：<span id="time"></span></label>
        </div>
        <div class="mui-input-row ">
            <label style="float: right!important;">订单状态：<span id="oredtype" ></span></label>
        </div>
        <div class="mui-input-row ">
            <label>下单金额：<span id="hetongmoney"></span></label>
        </div>
        <div class="mui-input-row ">
            <label>下单客户：<span id="username"></span></label>
        </div>
        <div class="mui-input-row ">
            <label>联系电话：<span id="phone"></span></label>
        </div>
        <div class="mui-input-row ">
            <label>身份证：<span id="sfz"></span></label>
        </div>
        <div class="mui-input-row ">
            <label>详细地址：<span id="address"></span></label>
        </div>
        <div class="mui-input-row " style="height: 240px;">
            <label>正面照：</label>
            <img src="" id="zimg" style="width: 50%;height: 190px;margin-left: 30%">
        </div>
<!--        <div class="mui-input-row " style="height: 240px;">-->
<!--            <label>背面照：</label>-->
<!--            <img src="" id="limg" style="width: 50%;height: 190px;margin-left: 30%">-->
<!--        </div>-->
        <div class="mui-input-row "  id="remakevalue">
            <label style="width: 30%">选择：</label>
            <select class="shortselect" id="levename">
                <option value="2" >一级经纪人</option>
                <option value="3" >代理商</option>
                <option value="4" >后续经纪人</option>
            </select>
        </div>
        <div class="mui-input-row " style="height: 40px;" id="butn">
            <a  href="JavaScript:saveremake(0)"class="mui-btn mui-btn-primary" style="height: 30px;margin-top: 5px;color: #FFF;float: right;width: 45%">通过</a>
            <a  href="JavaScript:saveremake(1)" class="mui-btn mui-btn-primary" style="width: 45%;height: 30px;margin-top: 5px;color: #FFF;background-color: #FF8C69; border: 1px solid #FF8C69;float:right;margin-right: 4px;" >不通过</a>
        </div>
    </form>

    <div class="footerpage">
    </div>
</div>
<div id="outerdiv" style="text-align: center;position: fixed;z-index: 1000;top: 0;left: 0;
    width: 100%;height: 100%;background-color: rgba(255,255,255,.9);">
    <img id="bigimg" style="height: 80%;width: 80%;border: 0;
        margin: auto;position: absolute;top: 0;bottom: 0;left: 0;right: 0;" src="" />
</div>
</body>

<script src="../js/mui.min.js"></script>
<script src="../js/practise/push.js"></script>
<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/getUrlParam.js"></script>
<script src="../js/cookieutil.js" type="text/javascript" charset="utf-8"></script>
<script type="application/javascript">
    showLoading("正在加载..","div");
    var id=getUrlParam("id");
    //等级类型:0=粉丝,1=客户,2=一级经纪人,3=代理商,4=后续经纪人',
    var userid=getUrlParam("userid");
    if (id==undefined){ mui.toast('请求错误id为空');}
    function  saveremake(obj) {
        var levename= document.getElementById("levename").value;
        if (levename==""||levename==null||levename==undefined)
        {
            mui.toast('请你选择一个类型！');
            return;
        }
        var  dataobj;
        if (obj=="0") {
            dataobj = {
                id: id,
                status: 5,
                userid:userid,
                userleve:levename
            }
        }
        if (obj =="1")
        {
            dataobj = {
                id: id,
                status: 7,
                userid:userid,
                userleve:levename
            }
        }
        mui.post('/Order/updateOrderTypeuser',
            dataobj,
            function(data) {
                if (data.object>0)
                {
                    mui.toast('提交成功！');
                    window.location.reload();
                }
            },'json'
        )
    }


    function getuser(id){
        mui.post('/User/findByid',
            {
                id:id
            },
            function(data){
                console.log(data);
                if (data.code&&data.object!=null){
                    var  item=data.object;
                    var sfz = document.getElementById("sfz");
                    sfz.innerHTML =item.bio;//改变内容
                }
            },'json'
        );
    }
    $(function(){
        /*公共部分
         * 导航栏
         * footer CopyRight
         */

        $(".headage").load("head.html");
        $(".footerpage").load("footer.html");
        mui.post('/Order/findOredId',
            {
                id:id
            },
            function(data){
                console.log(data);
                if (data.code&&data.object!=null){
                    var  item=data.object;
                    getuser(item.userid);
                    var oredid = document.getElementById("oredid");
                    oredid.innerHTML =item.id;//改变内容

                    if (item.statustype!="4")
                    {
                        var remakevalue = document.getElementById("remakevalue");
                        remakevalue.style.display="none";
                        var butn = document.getElementById("butn");
                        butn.style.display="none";
                    }
                    var time = document.getElementById("time");
                    time.innerHTML =formattime(item.createtime);//改变内容

                    var oredtype = document.getElementById("oredtype");
                    oredtype.innerHTML =getstatustype(item.statustype);//改变内容

                    var hetongmoney = document.getElementById("hetongmoney");
                    hetongmoney.innerHTML =item.hetongmoney;//改变内容

                    var username = document.getElementById("username");
                    username.innerHTML =item.username;//改变内容


                    var phone = document.getElementById("phone");
                    phone.innerHTML =item.phone;//改变内容


                    var address = document.getElementById("address");
                    address.innerHTML =item.address;//改变内容



                    var arr=item.preimages.split(",");
                    var x = document.getElementById("zimg");
                    x.src =imgsrcpath()+ arr[0];//改变内容
                    // var l = document.getElementById("limg");
                    // l.src = imgsrcpath()+arr[1];//改变内容


                }
            },'json'

        );
        hideLoading();//隐藏后的回调函数
    });

</script>
</html>